const mongoose = require('mongoose')    //引入Mongoose
const Schema = mongoose.Schema          //声明Schema
let ObjectId = Schema.Types.ObjectId    //声明Object类型
const userSchema = new Schema({
    userId:ObjectId,
    name:{unique:true,type:String},
    city:{type:String},
    sex:{type:Number},
    account:{unique:true,type:String},
    password:{type:String},
    role:{type:Number}
})

mongoose.model('User',userSchema)